================================================================
Script:		Community Plugin Configuration
Created:	02/08/2011
Author:		Cycrow
Version:	1.50
Game:		X3: Terran Conflict V2.5+
================================================================


Introduction:

This script is designed to allow the community of a central location for thier configuration menus.
This creates a menu that lists all the scripts that have configuration, selecting them will open up the scripts own configuration menu.

You can also add single setting options into the menu, that players can change from within the menu

Users:

This script will only work if other scripts have been added to its list.  To use it, simply set the hotkey and press it to open the menu.

if no menu opens, then most likly there is no configurable scripts available.


Scripters:

There are various ways of adding your config.  The main is to add your package to the list, and have it open your configuration menu

To do this, you simply need to call the script, plugin.config.addscript, from your setup script.

It takes 5 arguments, the script name and script author (ie you) and the config script are all required.
The 4th allows you to add your name into the menu, with this, it will display your package as, Author: Package name
The 5th allows you to add you script into a different section.  The section is simply a string of the section name.
Then a new section will be created and your script will appear in there.

The 3rd argument, config script, is the string name of the script to run.  Ie, you create your own script and type in the name of it here.
When your script is selected from the menu, it will run this script so you can have your own menu open up to do what ever config is required

NOTE: When running the config scripts, you must run them normally and not use "START" to create a new process.  This will break if the script is used by someone who doesn't have this installed


Options:

As well as adding your own package menu, you can also add single options.

There are currently 3 types of options you can add.  The options will display the option in the menu, as well as thier current value.  Selecting the value allows you to change the option.

All options have the same basic 4 arguments, these are:
	Unique ID: This is a string id to identify your option from someone elses, can be anything you like
	Option Text: This is the text of your option, and is what will be displayed on the menu
	Setting Script: This is an optional script that can be run when your option is selected, althou until the packages, this is not needed. Scripts need 2 arguments, the first is the Unique ID, the second is the value its been set to
	Section: Like with the package list, this allows you to add your option to a certain section in the menu

As said, when the user selects your option, the value will change depending on the type of option, you can use the script to do anything else you might need to

Boolean Option
	This is a simple On/Off switch, selecting it turns the option, on, or off.

	To use this, you need to call the script, plugin.config.addboolean, which has the first 4 arguments above, plus the default value.
	This is the value that it will start at, ie TRUE, or FALSE.

	Selecting this option in the menu simply cycles between on and off.

Cycle Option:
	This is an extension to the Boolean, but it allows you to cycle between more entries that you define.

	To use this, you need to call the script, plugin.config.addcycle, The 5th argument is an array of your options. The default will be set to the first entry

	When selecting this option, it will cycle between your available options from the array

Select Option:
	This is simplar to the Cycle Option, its created in the same way, using the script, plugin.config.addselect.  And uses the option array.

	The difference with this options, is how the user selects it.  Instead of cycling between the available options, it'll open a seperate menu with all the options for the user to pick.

If your scripts need to check the status of your values, there is a script you can call, plugin.config.getvalue, you send it your Unique ID, and it returns the currently set value

Number Option:
	This is the same as cycle, but will create the array for you, you just set the number to start and end at, and it'll create all the options in between.
	This is basically just a shortcut, saving you from having to create the array yourself

Input Option:
	This is like the Select option, but instead of selecting options from lists, you get an input instead.  You can set various input types like number, string, ship, race, sector, etc

Menu:
	You can also create your own menus, and have the menus open up from other menus.  All scripts used to add options also now has a Menu Argument, this specifies the menu you want the option to be added to
	Leaving this option blank, or null will add the options to the main menu (ie the same as normal) 
	Otherwise, you can set this to the unique menu id, and the option will then only display when viewing that specific menu.

	To create a new menu to add your options in, you use the plugin.config.addmenu script, setting the unique menu id that you use to add menus too.
	The menu will display the same as the scripts, with the name, and other display, but when selecting it, instead of running your script, it opens the menu and displays all items with the same menuid

	If you want to open your created menu from your own scripts/menus, etc.  Then you can call the 'plugin.config.displaymenu' script, with the menuid of your menu and your menu will then be displayed

Custom Section:
	When you create your own menu, you can create a custom section in this menu which you can control outside of the plugin scripts. 
	This can be used to create options in the menu that might not be possible with standard options without having to create a seperate menu for it
	The latest Turbo Booster will demonstrate this with its priotitiy settings.

	You simply define the script you want to be called when the menu is created, this script will need to accept to arguments (both arrays), the first is the settings array, the 2nd is the menu array to add your options to.  The section heading is added automatically.
	The return values can either be a name of a script to be run, or an array.  {CUSTOM, id, script, value}.  first entry must be "CUSTOM", When the option is selected, the script is run, sending the id and value via arguments to that script



===================================================

Change Log:
1.50:
	Fixed custom menu creatioon
	Added number cycle option
	Added Input option
	Added Custom Section support

1.41:
	Fixed saving config options between loads

1.40:
	Added Menu Support for creating seperate menu system

1.30:
	Updated to 2.5 new menu commands for cycles and boolean options
	Added Menu Alignment for Switch options

1.20:
	Added Option Settings
		Added Boolean Option
		Added Cycle Option
		Added Select Option

1.10:
	Added Sections
	Changed display name
	Added option to display Author
